package com.mycompany.Test.server;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import javax.xml.parsers.ParserConfigurationException;


import org.xml.sax.SAXException;

import com.mycompany.test.shared.*;
import com.google.gwt.core.client.EntryPoint;

public class ObjectResearch  {


	
	public static AllObjects Research() throws ParserConfigurationException, SAXException, IOException 
    { 
		List<Status> switcheslist = new ArrayList<Status>();
		List<Sensor> sensorslist = new ArrayList<Sensor>();
		List<Status> detectorslist = new ArrayList<Status>();
		List<Variator> variatorslist = new ArrayList<Variator>();

		String name = "./Test.xml";
		AllObjects allobjects = Parsage.XML(name, switcheslist, sensorslist, detectorslist, variatorslist);
		allobjects.SettingType();
		
		return allobjects;
			
	}
	
	public static AllObjects SearchState(String location, String type) throws ParserConfigurationException, SAXException, IOException 
    { 
		List<Status> switcheslist = new ArrayList<Status>();
		String name = "./State"+location+type+".xml";
		System.out.println(name);
		AllObjects allobjects = Parsage.XMLState(name, switcheslist);
		allobjects.SettingType();
		
		return allobjects;
			
	}

	
}

